Optimal. Leaf size=38 \[ a x-b d \cos (c) \text{CosIntegral}\left (\frac{d}{x}\right )+b d \sin (c) \text{Si}\left (\frac{d}{x}\right )+b x \sin \left (c+\frac{d}{x}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0783685, antiderivative size = 38, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.417, Rules used = {3361, 3297, 3303, 3299, 3302} \[ a x-b d \cos (c) \text{CosIntegral}\left (\frac{d}{x}\right )+b d \sin (c) \text{Si}\left (\frac{d}{x}\right )+b x \sin \left (c+\frac{d}{x}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3361
Rule 3297
Rule 3303
Rule 3299
Rule 3302
Rubi steps
\begin{align*} \int \left (a+b \sin \left (c+\frac{d}{x}\right )\right ) \, dx &=a x+b \int \sin \left (c+\frac{d}{x}\right ) \, dx\\ &=a x-b \operatorname{Subst}\left (\int \frac{\sin (c+d x)}{x^2} \, dx,x,\frac{1}{x}\right )\\ &=a x+b x \sin \left (c+\frac{d}{x}\right )-(b d) \operatorname{Subst}\left (\int \frac{\cos (c+d x)}{x} \, dx,x,\frac{1}{x}\right )\\ &=a x+b x \sin \left (c+\frac{d}{x}\right )-(b d \cos (c)) \operatorname{Subst}\left (\int \frac{\cos (d x)}{x} \, dx,x,\frac{1}{x}\right )+(b d \sin (c)) \operatorname{Subst}\left (\int \frac{\sin (d x)}{x} \, dx,x,\frac{1}{x}\right )\\ &=a x-b d \cos (c) \text{Ci}\left (\frac{d}{x}\right )+b x \sin \left (c+\frac{d}{x}\right )+b d \sin (c) \text{Si}\left (\frac{d}{x}\right )\\ \end{align*}
Mathematica [A] time = 0.0303449, size = 50, normalized size = 1.32 \[ a x-b d \left (\cos (c) \text{CosIntegral}\left (\frac{d}{x}\right )-\sin (c) \text{Si}\left (\frac{d}{x}\right )\right )+b x \sin (c) \cos \left (\frac{d}{x}\right )+b x \cos (c) \sin \left (\frac{d}{x}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.01, size = 43, normalized size = 1.1 \begin{align*} ax-bd \left ( -{\frac{x}{d}\sin \left ( c+{\frac{d}{x}} \right ) }-{\it Si} \left ({\frac{d}{x}} \right ) \sin \left ( c \right ) +{\it Ci} \left ({\frac{d}{x}} \right ) \cos \left ( c \right ) \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [C] time = 1.12897, size = 88, normalized size = 2.32 \begin{align*} -\frac{1}{2} \,{\left ({\left ({\left ({\rm Ei}\left (\frac{i \, d}{x}\right ) +{\rm Ei}\left (-\frac{i \, d}{x}\right )\right )} \cos \left (c\right ) -{\left (-i \,{\rm Ei}\left (\frac{i \, d}{x}\right ) + i \,{\rm Ei}\left (-\frac{i \, d}{x}\right )\right )} \sin \left (c\right )\right )} d - 2 \, x \sin \left (\frac{c x + d}{x}\right )\right )} b + a x \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.30836, size = 163, normalized size = 4.29 \begin{align*} b d \sin \left (c\right ) \operatorname{Si}\left (\frac{d}{x}\right ) + b x \sin \left (\frac{c x + d}{x}\right ) + a x - \frac{1}{2} \,{\left (b d \operatorname{Ci}\left (\frac{d}{x}\right ) + b d \operatorname{Ci}\left (-\frac{d}{x}\right )\right )} \cos \left (c\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \sin{\left (c + \frac{d}{x} \right )}\right )\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int b \sin \left (c + \frac{d}{x}\right ) + a\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]